﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace SimpleTaskManager.WebUI.Models
{
    /// <summary>
    /// The model which holds the settings made during the setup process.
    /// </summary>
    public class SetupModel
    {
        /// <summary>
        /// The administrator's password
        /// </summary>
        [Required(ErrorMessage = "Please enter a password")]
        [DataType(DataType.Password)]
        [Display(Name="Administrator password")]
        [StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 6)]
        public string AdminPass { get; set; }

        /// <summary>
        /// The confirmation of the administrator's password
        /// </summary>
        [Required(ErrorMessage = "Please repeat the password")]
        [DataType(DataType.Password)]
        [Display(Name = "Repeat password")]
        [Compare("AdminPass", ErrorMessage = "The new password and confirmation password do not match.")]
        public string AdminPassRep { get; set; }
    }
}